package com.linkhub.oms.data.sync.api.shopify.client;

import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Var;
import com.dtflys.forest.http.ForestResponse;
import com.linkhub.oms.data.sync.api.shopify.domain.response.OauthAccessTokenResponse;

/**
 * @Description: AuthenticationClient
 * @Author: echo
 * @Date: 2024/3/21 14:19
 * @Version: 1.0
 */
public interface AuthenticationClient {

    @Post(value = "{shop_url}/admin/oauth/access_token?client_id={client_id}" +
            "&client_secret={client_secret}&code={authorization_code}",
            dataType = "json")
    ForestResponse<OauthAccessTokenResponse> getAccessToken(@Var("shop_url") String shopUrl,
                                                            @Var("client_id") String clientId,
                                                            @Var("client_secret") String clientSecret,
                                                            @Var("authorization_code") String authorizationCode);
}
